/**
 * 公共选择模块，提供公共选择页面相关业务功能
 * 
 * @Date: 2016-1-28
 * @author: Jackson wang
 * @version: 1.0
 * @since: 1.0
 */
define(["jquery", "msgServ","ajaxServ","datagridServ"], 
	function($,msgServ,ajaxServ,datagridServ) {

	'use strict';
	var //用户选择
		deptUserSelectUrl='/common/query/deptUserSelect.action',
		deptUserSelectWindow='#win-dept-user',
		deptUserWindowWith='800',deptUserWindowHeight='600',
		
		//用户选择
		uploadSelectUrl='/upload/uploadfivePage.action',
		uploadSelectWindow='#win-upload-file',
		uploadWindowWith='800',uploadWindowHeight='600',
		
		//住院信息选择
		deptPatientSelectUrl='/common/deptPatientSelect.action',
		deptPatientSelectWindow='#win-dept-patient',
		deptPatientWindowWith='900',deptPatientWindowHeight='600',
		//门诊信息选择
		deptOutpatientSelectUrl='/common/deptOutpatientSelect.action',
		deptOutpatientSelectWindow='#win-dept-outpatient',
		deptOutpatientWindowWith='800',deptOutpatientWindowHeight='600',
		//部门选择
		deptSelectUrl='/common/deptSelect.action',
		deptSelectWindow='#win-dept-select',
		deptWindowWith='400',deptWindowHeight='600',
		
		//职能信息弹窗
		dutiesInfoUrl='/dutiesInfo/query/mainPage.action',
		dutiesInfoWindow='#win-duties-infomation',
		dutiesInfoWindowWith='900',dutiesInfoWindowHeight='700',
		
		//职能信息弹窗
		dutiesInquiryInfoUrl='/dutiesInquiry/query/inquiryInfoPage.action',
		dutiesInquiryInfoWindow='#win-duties-inquiry-infomation',
		dutiesInquiryInfoWindowWith='900',dutiesInquiryInfoWindowHeight='700',
		
		//职能信息弹窗
		medicalInfoUrl='/medicalInfo/query/mainPage.action',
		medicalInfoWindow='#win-medical-infomation',
		medicalInfoWindowWith='900',medicalInfoWindowHeight='700',
		
		//职能信息弹窗
		medicalBizInfoUrl='/medicalInpatient/query/bizInfoPage.action',
		medicalBizInfoWindow='#win-medical-biz-infomation',
		medicalBizInfoWindowWith='900',medicalBizInfoWindowHeight='700',
		
		//职能信息弹窗
		medicalInpatientItemFeeUrl='/medicalInpatient/query/editPage.action',
		medicalInpatientItemFeeWindow='#win-inpatient-item-fee',
		medicalInpatientItemFeeWindowWith='900',
		medicalInpatientItemFeeWindowHeight='700',
		
		//职能信息弹窗
		medicalOutpatientItemFeeUrl='/medicalOutpatient/query/editPage.action',
		medicalOutpatientItemFeeWindow='#win-outpatient-item-fee',
		medicalOutpatientItemFeeWindowWith='900',
		medicalOutpatientItemFeeWindowHeight='700',
		
		//供应商选择
		supplySelectUrl='/common/supplySelect.action',
		supplySelectWindow='#win-supply-select',
		supplySelectWindowWith='900',
		supplySelectWindowHeight='700',
		
		
		//供应商质询
		supplyInquirySelectUrl='/supplyInquiry/query/inquirySelectPage.action',
		supplyInquirySelectWindow='#win-supply-select',
		supplyInquirySelectWindowWith='900',
		supplyInquirySelectWindowHeight='700',
		
		//供应商查看详情浏览
		supplyInquiryDetailInfoUrl='/supplyInquiry/query/supplyDetailPop.action',
		supplyInquiryDetailInfoWindow='#win-supply-detail-infomation',
		supplyInquiryDetailInfoWindowWith='900',
		supplyInquiryDetailInfoWindowHeight='700',
		
		//供应商质询
		satisRankSelectUrl='/satisEvaluate/query/satisfactionInfoPage.action',
		satisRankSelectWindow='#win-satisfaction-infomation',
		satisRankSelectWindowWith='900',
		satisRankSelectWindowHeight='700'
		
	var public_method = {
		/**
		 * 部门人员选择
		 * @param _options.rootPath
		 */
		deptUserSelect:function(_options){
					
			var _param = {
				window:$(deptUserSelectWindow),
				href:'/'+_options.rootPath+deptUserSelectUrl,
				width:deptUserWindowWith,
				height:deptUserWindowHeight,
				flag:false,
				existCheckElement:'#div-dept-user'}
			datagridServ.windowEdit(_param);					
				
		},
		
		uploadSelect:function(_options){
					
			var _param = {
				window:$(uploadSelectWindow),
				href:'/'+_options.rootPath+uploadSelectUrl,
				width:uploadWindowWith,
				height:uploadWindowHeight,
				flag:false,
				existCheckElement:'#div-dept-user'}
			datagridServ.windowEdit(_param);					
				
		},
		
		deptSelect:function(_options){
							
			var _param = {
				window:$(deptSelectWindow),
				href:'/'+_options.rootPath+deptSelectUrl,
				width:deptWindowWith,
				height:deptWindowHeight,
				flag:false,
				existCheckElement:'#div-dept-select'}
			datagridServ.windowEdit(_param);					
				
		},
		deptPatientSelect:function(_options){
							
			var _param = {
				window:$(deptPatientSelectWindow),
				href:'/'+_options.rootPath+deptPatientSelectUrl,
				width:deptUserWindowWith,
				height:deptUserWindowHeight,
				flag:false,
				existCheckElement:'#div-dept-patient'}
			datagridServ.windowEdit(_param);					
				
		},
		
		deptOutpatientSelect:function(_options){
							
			var _param = {
				window:$(deptOutpatientSelectWindow),
				href:'/'+_options.rootPath+deptOutpatientSelectUrl,
				width:deptWindowWith,
				height:deptWindowHeight,
				flag:false,
				existCheckElement:'#div-dept-outpatient'}
			datagridServ.windowEdit(_param);					
				
		},
		dutiesInfoSelect:function(_options){
							
			var _param = {
				window:$(dutiesInfoWindow),
				href:'/'+_options.rootPath+dutiesInfoUrl,
				width:dutiesInfoWindowWith,
				height:dutiesInfoWindowHeight,
				flag:false,
				existCheckElement:'#panel-duties-info'}
			datagridServ.windowEdit(_param);					
				
		},
		
		dutiesInquiryInfoSelect:function(_options){
							
			var _param = {
				window:$(dutiesInquiryInfoWindow),
				href:'/'+_options.rootPath+dutiesInquiryInfoUrl,
				width:dutiesInquiryInfoWindowWith,
				height:dutiesInquiryInfoWindowHeight,
				flag:false,
				existCheckElement:'#panel-duties-inquiry-info'}
			datagridServ.windowEdit(_param);					
				
		}
		,
		medicalInfoSelect:function(_options){
							
			var _param = {
				window:$(medicalInfoWindow),
				href:'/'+_options.rootPath+medicalInfoUrl,
				width:medicalInfoWindowWith,
				height:medicalInfoWindowHeight,
				flag:false,
				existCheckElement:'#panel-medical-info'}
			datagridServ.windowEdit(_param);					
				
		}
		
		,
		medicalBizInfoSelect:function(_options){
							
			var _param = {
				window:$(medicalBizInfoWindow),
				href:'/'+_options.rootPath+medicalBizInfoUrl,
				width:medicalBizInfoWindowWith,
				height:medicalBizInfoWindowHeight,
				flag:false,
				existCheckElement:'#panel-medical-info'}
			datagridServ.windowEdit(_param);					
				
		}
		
		,
		medicalInpatientItemFeeSelect:function(_options){
							
			var _param = {
				window:$(medicalInpatientItemFeeWindow),
				href:'/'+_options.rootPath+medicalInpatientItemFeeUrl,
				width:medicalInpatientItemFeeWindowWith,
				height:medicalInpatientItemFeeWindowHeight,
				flag:false,
				existCheckElement:'#inpatient-item-fee'}
			datagridServ.windowEdit(_param);					
				
		}
		
		,
		medicalOutpatientItemFeeSelect:function(_options){
							
			var _param = {
				window:$(medicalOutpatientItemFeeWindow),
				href:'/'+_options.rootPath+medicalOutpatientItemFeeUrl,
				width:medicalOutpatientItemFeeWindowWith,
				height:medicalOutpatientItemFeeWindowHeight,
				flag:false,
				existCheckElement:'#outpatient-item-fee'}
			datagridServ.windowEdit(_param);					
				
		}
		
		,
		supplySelect:function(_options){
							
			var _param = {
				window:$(supplySelectWindow),
				href:'/'+_options.rootPath+supplySelectUrl,
				width:supplySelectWindowWith,
				height:supplySelectWindowHeight,
				flag:false,
				existCheckElement:'#div-supply-select'}
			datagridServ.windowEdit(_param);					
				
		}
		
		,
		supplyInquirySupplyDetail:function(_options){
							
			var _param = {
				window:$(supplyInquiryDetailInfoWindow),
				href:'/'+_options.rootPath+supplyInquiryDetailInfoUrl,
				width:supplyInquiryDetailInfoWindowWith,
				height:supplyInquiryDetailInfoWindowHeight,
				flag:false,
				existCheckElement:'#div-supply-inquiry-detailInfo'}
			datagridServ.windowEdit(_param);					
				
		}
		
		,
		supplyInquirySelect:function(_options){
							
			var _param = {
				window:$(supplyInquirySelectWindow),
				href:'/'+_options.rootPath+supplyInquirySelectUrl,
				width:supplyInquirySelectWindowWith,
				height:supplyInquirySelectWindowHeight,
				flag:false,
				existCheckElement:'#div-supply-select'}
			datagridServ.windowEdit(_param);					
				
		}
		,
		satisRankSelect:function(_options){
							
			var _param = {
				window:$(satisRankSelectWindow),
				href:'/'+_options.rootPath+satisRankSelectUrl,
				width:satisRankSelectWindowWith,
				height:satisRankSelectWindowHeight,
				flag:false,
				existCheckElement:'#div-supply-select'}
			datagridServ.windowEdit(_param);					
				
		}
		
		
	}
	
	return public_method
})